package com.github.phoenics.militia.bazookaFx.domain.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

import java.io.Serializable;

/**
 * 数据表类型，table，view
 *
 * @author Phoenics Chow
 * on 2019年02月01日
 */
public enum TableType implements IEnum {

    BASETABLE(1,"BASE TABLE"),VIEW(2,"VIEW");
    private String name;
    private Integer code;
    TableType(final Integer code,final String name){
        this.code=code;
        this.name=name;
    }
    @JsonValue
    public String getName() {
        return this.name;
    }

    @Override
    public Serializable getValue() {
        return code;
    }
}
